<template>
    <ui-main :title="title">
        <!--<template slot="topTitle"><div class="header item border-0"><h3>我是自定义标题</h3></div></template>-->
        <!-- 下面放置页面内容 插槽 -->
        <div>
            <h1> 内容 </h1>
            <p class="p-20">
                <a class="ui mini compact icon basic button" @click="closePop">
                    <i class="icon refresh"></i>
                    关闭
                </a>
                <a class="ui mini compact icon basic button" @click="open">
                    <i class="icon refresh"></i>
                    打开
                </a>
            </p>
        </div>
    </ui-main>
</template>
<script>
    export default {
        data() {
            return {
                title: this.$parent.params.title || '详细表单及内容',
                num: 'I'
            }
        },
        mounted() {
            /*console.clear()
            this.log('%c💬参数 : ' + this.$parent.params.title, 'color:#f90')*/
        },
        methods: {
            closePop() {
                // this.$emit('global:closeDrawer')
                this.$parent.close()
                // this.$bui.findCompUpward(this, 'drawerComp').close()
            },
            open() {
                this.$bui.drawer({
                    comp: () => import('./_test.vue'),
                    params: {
                        title: this.$parent.params.title + this.num
                    }
                })
            }
        }
    }
</script>
